(global.webpackJsonp = global.webpackJsonp || []).push([ [ "luck/draw/components/my-turntable-draw" ], {
    "0bbe": function(t, e, n) {
        n.r(e);
        var i = n("a191"), o = n("b9a1");
        for (var r in o) "default" !== r && function(t) {
            n.d(e, t, function() {
                return o[t];
            });
        }(r);
        n("f8fa");
        var a = n("f0c5"), s = Object(a.a)(o.default, i.b, i.c, !1, null, null, null, !1, i.a, void 0);
        e.default = s.exports;
    },
    "80fe": function(t, e, n) {
        Object.defineProperty(e, "__esModule", {
            value: !0
        }), e.default = void 0;
        var i = {
            props: {
                canvasWidth: {
                    type: Number,
                    default: 480
                },
                canvasHeight: {
                    type: Number,
                    default: 480
                },
                prizeList: {
                    type: Array,
                    validator: function(t) {
                        return t.length % 2 == 0;
                    },
                    required: !0
                },
                colors: {
                    type: Array,
                    default: function() {
                        return [ "#FFF", "#FFE9AA" ];
                    },
                    validator: function(t) {
                        return 2 === t.length;
                    }
                },
                duration: {
                    type: Number,
                    default: 8
                },
                ringCount: {
                    type: Number,
                    default: 8
                },
                strKey: {
                    type: String,
                    default: String
                },
                targetIndex: {
                    type: Number,
                    default: 0
                }
            },
            watch: {
                prizeList: {
                    immediate: !0,
                    deep: !0,
                    handler: function(t) {
                        this.color1 = this.colors[0], this.color2 = this.colors[1], this.setView();
                    }
                }
            },
            mounted: function() {},
            data: function() {
                return {
                    isClick: !0,
                    isShow: !0,
                    skew: 0,
                    degs: 0,
                    color1: "#FFF",
                    color2: "#FFF",
                    textWidth: "50%",
                    rotates: 0,
                    isRoteIndex: 0
                };
            },
            methods: {
                setView: function() {
                    var t = this.prizeList.length;
                    this.textWidth = 180 / t + "%";
                    var e = 360 / t;
                    t < 4 || (this.degs = e, this.skew = e - 90);
                },
                handleAction: function() {
                    if (!this.isClick) return !1;
                    this.$emit("befoterClick", {
                        type: "start",
                        callback: this.rotoreAction
                    });
                },
                rotoreAction: function(t) {
                    this.isClick = !1;
                    var e = 0;
                    this.isShow ? (e = (this.prizeList.length - 1 - t) * this.degs + 360 * this.ringCount, 
                    this.isShow = !1, this.rotates += e + this.degs / 2) : (e = -(t - this.isRoteIndex) * this.degs + 360 * this.ringCount, 
                    this.rotates += e);
                    this.isRoteIndex = t, this.setTimeOut();
                },
                setTimeOut: function() {
                    var t = this;
                    setTimeout(function() {
                        console.log("转动结束"), t.$emit("afterClick", {
                            type: "end",
                            content: t.prizeList[t.targetIndex],
                            callback: t.endAction
                        }), t.isClick = !0;
                    }, 1e3 * this.duration + 100);
                },
                endAction: function() {
                    console.log("本次选中的：" + this.prizeList[this.targetIndex].name);
                }
            }
        };
        e.default = i;
    },
    a191: function(t, e, n) {
        n.d(e, "b", function() {
            return i;
        }), n.d(e, "c", function() {
            return o;
        }), n.d(e, "a", function() {});
        var i = function() {
            this.$createElement;
            this._self._c;
        }, o = [];
    },
    b496: function(t, e, n) {},
    b9a1: function(t, e, n) {
        n.r(e);
        var i = n("80fe"), o = n.n(i);
        for (var r in i) "default" !== r && function(t) {
            n.d(e, t, function() {
                return i[t];
            });
        }(r);
        e.default = o.a;
    },
    f8fa: function(t, e, n) {
        var i = n("b496");
        n.n(i).a;
    }
} ]), (global.webpackJsonp = global.webpackJsonp || []).push([ "luck/draw/components/my-turntable-draw-create-component", {
    "luck/draw/components/my-turntable-draw-create-component": function(t, e, n) {
        n("543d").createComponent(n("0bbe"));
    }
}, [ [ "luck/draw/components/my-turntable-draw-create-component" ] ] ]);